package com.meeting.meetingroom_api.service;

import com.meeting.meetingroom_api.dto.LoginRequestDto;
import com.meeting.meetingroom_api.dto.UserDto;
import com.meeting.meetingroom_api.dto.UserRegistrationDto;
import com.meeting.meetingroom_api.dto.UserUpdateDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.meeting.meetingroom_api.enums.UserRole;

import java.util.List;

public interface UserService {
    UserDto registerUser(UserRegistrationDto registrationDto);
    UserDto loginUser(LoginRequestDto loginRequestDto); 
    UserDto getUserById(Integer userId);
    UserDto getUserByUsername(String username);
    Page<UserDto>  getAllUsers(Pageable pageable);
    Page<UserDto> getUsersByRole(UserRole role, Pageable pageable);
    UserDto updateUser(Integer userId, UserUpdateDto userUpdateDto, Integer adminIdIfApproval); // adminIdIfApproval for customer approval
    void deleteUser(Integer userId);
    // Add more methods as needed, e.g., password change, account activation/deactivation
    UserDto approveCustomerRegistration(Integer customerId, Integer adminId);
    UserDto changeUserAccountStatus(Integer userId, String newStatus, Integer adminId);
    // 获取所有待审核客户（分页）
    Page<UserDto> getPendingCustomers(Pageable pageable);

    // 获取所有待审核客户（不分页）
    List<UserDto> getPendingCustomers();
    
    // 拒绝客户注册申请
    void rejectCustomerRegistration(Integer customerId, Integer adminId, String rejectionReason);
    
    // 获取活跃中的用户或员工（分页）
    Page<UserDto> getActiveUsers(Pageable pageable);
    
    // 获取活跃中的特定角色用户（分页）
    Page<UserDto> getActiveUsersByRole(UserRole role, Pageable pageable);
    
    // 获取冻结的用户或员工（分页）
    Page<UserDto> getFrozenUsers(Pageable pageable);
    
    // 获取冻结的特定角色用户（分页）
    Page<UserDto> getFrozenUsersByRole(UserRole role, Pageable pageable);
    
    // ==================== 员工审核相关方法 ====================
    
    // 获取所有待审核员工（分页）
    Page<UserDto> getPendingEmployees(Pageable pageable);

    // 获取所有待审核员工（不分页）
    List<UserDto> getPendingEmployees();
    
    // 审核通过员工注册申请
    UserDto approveEmployeeRegistration(Integer employeeId, Integer adminId);
    
    // 拒绝员工注册申请
    void rejectEmployeeRegistration(Integer employeeId, Integer adminId, String rejectionReason);
}